package Igraf;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

public class mipanel extends JPanel {   
    
    public mipanel(int w, int h){    
        this.setSize(w,h);
    }    
 
    @Override
    public void paint(Graphics g){
       ImageIcon imagenFondo = new ImageIcon(getClass().getResource("/Argazkia/fondo.jpg"));                     
       g.drawImage(imagenFondo.getImage(),0,0,getWidth(),getHeight(), null);                
        setOpaque(false);
        super.paintComponent(g);
    }    
}  

